﻿
#region Copyright & License
// --------------------------
// Copyright 2008 Daniel Gray
// --------------------------
// This file is part of Kale.
//
// Kale is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Kale is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with Kale.  If not, see <http://www.gnu.org/licenses/>.
#endregion
#region File details
// --------------------------------------------------------
// Filename          : Exceptions.cs
// Author            : Daniel Gray
// Created           : 29/04/2008
// --------------------------------------------------------
#endregion
            
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Kale.Core.Security
{
   
   /// <summary>
   /// Exception thrown when a users session has expired.
   /// </summary>            
   [Serializable]
   public class SessionExpiredException : ApplicationException
   {
      /// <summary>
      /// Initializes a new instance of the <see cref="SessionExpiredException"/> class.
      /// </summary>            
      public SessionExpiredException() : base() { }
      /// <summary>
      /// Initializes a new instance of the <see cref="SessionExpiredException"/> class.
      /// </summary>
      /// <param name="message">The message.</param>               
      public SessionExpiredException(string message) : base(message) { }
      /// <summary>
      /// Initializes a new instance of the <see cref="SessionExpiredException"/> class.
      /// </summary>
      /// <param name="message">The message.</param>
      /// <param name="innerException">The inner exception.</param>               
      public SessionExpiredException(string message, Exception innerException) : base(message, innerException) { }
      /// <summary>
      /// Initializes a new instance of the <see cref="SessionExpiredException"/> class.
      /// </summary>
      /// <param name="info">The object that holds the serialized object data.</param>
      /// <param name="context">The contextual information about the source or destination.</param>               
      public SessionExpiredException(SerializationInfo info, StreamingContext context) : base(info, context) { }
   }

   
   /// <summary>
   /// Exception thrown when an unknown session is requested.
   /// </summary>            
   [Serializable]
   public class UnknownSessionException : ApplicationException
   {
      /// <summary>
      /// Initializes a new instance of the <see cref="UnknownSessionException"/> class.
      /// </summary>            
      public UnknownSessionException() : base() { }
      /// <summary>
      /// Initializes a new instance of the <see cref="UnknownSessionException"/> class.
      /// </summary>
      /// <param name="message">The message.</param>               
      public UnknownSessionException(string message) : base(message) { }
      /// <summary>
      /// Initializes a new instance of the <see cref="UnknownSessionException"/> class.
      /// </summary>
      /// <param name="message">The message.</param>
      /// <param name="innerException">The inner exception.</param>               
      public UnknownSessionException(string message, Exception innerException) : base(message, innerException) { }
      /// <summary>
      /// Initializes a new instance of the <see cref="UnknownSessionException"/> class.
      /// </summary>
      /// <param name="info">The object that holds the serialized object data.</param>
      /// <param name="context">The contextual information about the source or destination.</param>               
      public UnknownSessionException(SerializationInfo info, StreamingContext context) : base(info, context) { }
   }
            
}
